{include file="header.html"}
<div id="main">
  {include file="menus.html"}
  <div id="rightCon" class="clearfix layui-body">
    <div class="scroller">
      <div class="explanation" id="explanation">
        <div class="title" id="checkZoom"> <i class="fa fa-lightbulb-o"></i>
          <h4 title="{$lang.operation_tip}">{$lang.operation_tip}</h4>
        </div>
        <ul>
          <li><i class="fa fa-angle-double-right"></i> {$lang.wxmenu_desc_1}</li>
          <li><i class="fa fa-angle-double-right"></i> {$lang.wxmenu_desc_2}</li>
        </ul>
      </div>
      <div class="flexigrid">
        <form method="post" enctype="multipart/form-data">
          <table class="infoTable">
            <tr>
              <th class="paddingT15"><label>{$lang.menu_name}</label></th>
              <td class="paddingT15 wordSpacing5"><input class="infoTableInput" id="name" type="text" name="name"
                  value="{$menu.name|escape}" />
                <label class="field_notice"></label>
              </td>
            </tr>
            <tr>
              <th class="paddingT15"><label>{$lang.parent}</label></th>
              <td class="paddingT15 wordSpacing5"><select id="parent_id" name="parent_id">
                  <option value="0">{$lang.select_pls}</option>

                  {html_options options=$parents selected=$menu.parent_id}

                </select>
                <label class="field_notice"></label>
              </td>
            </tr>
            <tr>
              <th class="paddingT15"><label>{$lang.menu_type}</label></th>
              <td class="paddingT15 wordSpacing5">
                <p>
                  <label>
                    <input type="radio" name="type" value="view" {if $menu.type neq 'click' }checked="checked" {/if} />
                    {$lang.to_url}</label>
                  &nbsp;&nbsp;
                  <label>
                    <input type="radio" name="type" value="click" {if $menu.type eq 'click' }checked="checked" {/if} />
                    {$lang.send_msg}</label>
                  <label class="field_notice"></label>
                </p>
              </td>
            </tr>
            <tr class="view sel">
              <th class="paddingT15"><label>{$lang.url}</label></th>
              <td class="paddingT15 wordSpacing5"><input class="infoTableInput" type="text" name="link"
                  value="{$menu.link}" />
                <label class="field_notice"></label>
              </td>
            </tr>
            <tr class="click sel hidden">
              <th class="paddingT15"><label>{$lang.title}</label></th>
              <td class="paddingT15 wordSpacing5"><input type="hidden" name="reply_id" value="{$menu.reply_id}" />
                <input class="infoTableInput" type="text" name="reply_title" value="{$menu.reply.title|escape}" />
                <label class="field_notice"></label>
              </td>
            </tr>
            <tr class="click sel hidden">
              <th class="paddingT15"><label>{$lang.image}</label></th>
              <td class="paddingT15 wordSpacing5 webkit-box">
                <div class="input-file-show">
                  <input class="type-file-file" onchange="getTempPathcallback(this)" name="image" type="file" size="30" hidefocus="true">
                  <input type="hidden" name="fileVal" value="image" />
                  <div class="type-file-image">
                    <!--{if $menu.reply.image}-->
                    <img class="block" src="{$menu.reply.image|url_format}" width="100" height="100" />
                    <span>修改图片</span>
                    <!--{else}-->
                    <i class="iconfont icon-icon_pic"></i>
                    <!--{/if}-->
                  </div>
                </div>
              </td>
            </tr>
            <tr class="click sel hidden">
              <th class="paddingT15"><label>{$lang.reply_link}</label></th>
              <td class="paddingT15 wordSpacing5"><input class="infoTableInput" type="text" name="reply_link"
                  value="{$menu.reply.link|escape}" />
                <label class="field_notice"></label>
              </td>
            </tr>
            <tr class="click sel hidden">
              <th class="paddingT15"><label>{$lang.content}</label></th>
              <td class="paddingT15 wordSpacing5"><textarea name="reply_content">{$menu.reply.content|escape}</textarea>
              </td>
            </tr>
            <tr>
              <th class="paddingT15"><label>{$lang.sort_order}</label></th>
              <td class="paddingT15 wordSpacing5"><input class="sort_order" id="sort_order" type="text"
                  name="sort_order" value="{$menu.sort_order}" />
                <label class="field_notice">{$lang.sort_order_desc}</label>
              </td>
            </tr>
            <tr>
              <th></th>
              <td class="ptb20"><input class="layui-btn layui-bg-blue J_AjaxSubmit" type="submit"
                  value="{$lang.submit}" /></td>
            </tr>
          </table>
        </form>
      </div>
      {include file="version.html"}
    </div>
  </div>
</div>
<script type="text/javascript">
  $(function () {
    $('input[name="type"]').change(function () {
      var type = $(this).val();
      $('tr.sel').hide();
      $('tr.' + type).show();
    });
    $('tr.sel').hide();
    $('tr.' + $('input[name="type"]:checked').val()).show();
  });
</script>
{include file="footer.html"}